Skip to content

Comments

Show speaker availability in schedule builder#4588

Merged
patrick91 merged 1 commit intomainfrom
show-speaker-availability-in-schedule-builder
Feb 18, 2026
Merged

Show speaker availability in schedule builder#4588
patrick91 merged 1 commit intomainfrom
show-speaker-availability-in-schedule-builder

Conversation

@patrick91
Copy link
Member

@patrick91 patrick91 commented Feb 18, 2026

Stack

@vercel
Copy link

vercel bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pycon Error Error Feb 18, 2026 6:42pm

@claude
Copy link
Contributor

claude bot commented Feb 18, 2026

This PR adds speaker availability indicators to the schedule builder UI — showing preferred/available/unavailable badges on proposals in the add-item modal and a warning + tooltip on scheduled items when a speaker is unavailable for that time slot.

Issues

Silent no-op when availability is missing from tooltip

In AvailabilityTooltipContent in item.tsx, the tooltip renders <span>No availability data</span> when dates.length === 0, but the SpeakerNames component (which wraps the speaker name in a tooltip) only renders the tooltip when hasAvailabilities is true. These are consistent, but note that AvailabilityTooltipContent is also used inside the ScheduleItemCard unavailability warning banner — and that banner is only shown when availability === 'unavailable', which itself requires availabilities to be non-null. This is fine, but the defensive No availability data branch in AvailabilityTooltipContent will never actually be reached in the current code paths. Consider removing the dead branch or making it reachable.

Unavailability warning only shown for unavailable, not checked for preferred/available absence

The warning banner in ScheduleItemCard fires only when the slot maps to unavailable. If the speaker has availability data but the current slot has no key at all (i.e., the slot falls outside the half-days the speaker filled in), the silence is ambiguous. A comment or explicit handling of this case (null vs. absent key) would make the intent clearer for future maintainers.

Type annotation mismatch on _speaker_availabilities

In backend/api/participants/types.py:34, the field is annotated as strawberry.Private[int] but holds a dict (JSON). This is pre-existing but the PR reads this field in new UI paths — worth fixing to avoid confusion:

_speaker_availabilities: strawberry.Private[dict]  # or strawberry.Private[JSON]

Inline style mixed with Tailwind

AvailabilityBadge and AvailabilityTooltipContent in item.tsx use raw inline style={{}} objects, while proposal-preview.tsx uses Tailwind classes for the equivalent badges. The project uses Tailwind throughout; prefer Tailwind classes for consistency.

No test coverage for the new availability key logic

getSlotAvailabilityKey in availability.ts is the core mapping that determines which half-day bucket a slot falls into. It has no tests. Edge cases worth covering: midnight (00:00 → am), noon exactly (12:00 → pm), and malformed slotHour strings.

@patrick91 patrick91 force-pushed the show-speaker-availability-in-schedule-builder branch from a2a7d37 to 4079970 Compare February 18, 2026 18:41
@patrick91 patrick91 marked this pull request as ready for review February 18, 2026 18:41
@patrick91 patrick91 merged commit 4c75cd2 into main Feb 18, 2026
7 of 8 checks passed
@patrick91 patrick91 deleted the show-speaker-availability-in-schedule-builder branch February 18, 2026 18:42
@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.49%. Comparing base (62a0f4e) to head (4079970).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4588      +/-   ##
==========================================
- Coverage   92.52%   92.49%   -0.04%     
==========================================
  Files         357      357              
  Lines       10690    10697       +7     
  Branches      812      813       +1     
==========================================
+ Hits         9891     9894       +3     
- Misses        687      691       +4     
  Partials      112      112              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant